package parseHelper

import (
	"strconv"
	"unsafe"
)

func ParseInt(string2 string) int {
	res, err := strconv.Atoi(string2)
	if err != nil {
		panic(err.Error())
	}
	return res
}
func StringParseInt64(string2 string) int64 {
	return IntParseInt64(ParseInt(string2))
}
func ParseFloat64(string2 string) float64 {
	float, err := strconv.ParseFloat(string2, 64)
	if err != nil {
		panic(err)
	}
	return float
}
func Float64ParseInt(num float64) int {
	return int(num)
}
func Int64ParseToString(num int64) string {
	return strconv.Itoa(int(num))
}
func IntParseInt64(num int) int64 {
	return *(*int64)(unsafe.Pointer(&num))
}
